﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplicationTestOutlook
{
	class Program
	{
		static void Main(string[] args)
		{
			System.ServiceModel.ServiceHost host = new System.ServiceModel.ServiceHost(typeof(WcfTranslateLibrary.TranslateService));
			host.Open();

			Console.WriteLine("Host opened successfully. Press any key to close it");
			Console.ReadLine();

			if (host != null && host.State == System.ServiceModel.CommunicationState.Opened)
				host.Close();

			try
			{
				using (OutlookManagerLibrary.OutlookManager manager = new OutlookManagerLibrary.OutlookManager())
				{
					//var list = manager.GetMailList();
					//if (list != null)
					//{

					//}
					manager.Method1();

					Console.WriteLine("Press any key");
					Console.ReadKey();

				}
			}
			catch (System.Runtime.InteropServices.COMException ex) { Console.WriteLine(ex.Message); }

		}
	}
}
